package main

import "fmt"

func main() {

	student1 := make(map[string]string)
	student2 := make(map[string]string)
	student3 := make(map[string]string)

	student1["name"] = "zhangsan"
	student1["age"] = "19"
	student1["addres"] = "shenyang"

	student2["name"] = "lisi"
	student2["age"] = "20"
	student2["addres"] = "dalian"

	student3["name"] = "wangwu"
	student3["age"] = "21"
	student3["addres"] = "guangdong"

	student4 := make(map[string]string)
	student4["name"] = "lisi"
	student4["age"] = "20"
	student4["addres"] = "guangdong"

	var arr1 []map[string]string
	arr1 = append(arr1, student1, student2, student3, student4)

	for _, value := range arr1 {
		fmt.Println(value["name"])
	}

	//map1 := make(map[string]string)
	//map1["z"] = "1"
	//map1["b"] = "2"
	//map1["c"] = "3"
	//map1["d"] = "4"
	//for index, value := range map1 {
	//	fmt.Println(index, value)
	//
	//}
	//fmt.Println(len(map1))

	/*
		map1 := make(map[int]string)
		map1[1] = "Java"
		map1[2] = "Go"
		map1[3] = "Python"
		map1[4] = "Java"
		map1[5] = "Go"
		fmt.Println(map1)

		value, ok := map1[100]
		if ok {
			fmt.Println(value)
		} else {
			fmt.Println("not found")
		}

	*/

	/*
		delete(map1, 1)
		fmt.Println(map1)

	*/

	/*
		arr1 := make([]int, 0, 10)
		arr1 = append(arr1, 1, 2, 3, 4)
		fmt.Println(arr1)

	*/
	/*
		//生命 + 初始化
		map1 := map[int]string{1: "C++", 2: "Java", 3: "Python"}
		fmt.Println(map1)

	*/

	/*
		arr1 := []int{1, 2, 3}
		fmt.Println(len(arr1), cap(arr1))

		arr1 = append(arr1, 4, 5, 6)
		fmt.Println(len(arr1), cap(arr1))

		arr1 = append(arr1, 4, 5, 6)
		fmt.Println(len(arr1), cap(arr1))
		//fmt.Println(arr1)

	*/
}
